package cn.com.simple.learning.designpattern.behavior.responsibility;

/**
 * @author Jianxing.Jia
 * @date 2022/2/9
 * @description 描述信息
 */
public class LessonPeriodRule extends RuleHandler {

    @Override
    protected boolean apply(Rule rule) {

        // 校验是否完成规定课时
        if (rule.isLessonPeriod()) {
            if (this.getNextRuleHandler() != null) {
                return this.getNextRuleHandler().apply(rule);
            }
            return true;
        }
        return false;
    }
}
